Re: [NTG-context] Ampersand in \unprotect fails in LMTX

2021-07-09 Thread Wolfgang Schuster
Marco Patzer schrieb am 09.07.2021 um 14:46: On Fri, 9 Jul 2021 14:29:20 +0200 Hans Hagen wrote: As \& works for MkIV as well as LMTX, there's an easy workaround. But maybe this isn't intended behaviour and needs checking. intended ... author passes different through the system in lmtx

Re: [NTG-context] Ampersand in \unprotect fails in LMTX

2021-07-09 Thread Marco Patzer
On Fri, 9 Jul 2021 14:29:20 +0200 Hans Hagen wrote: > > As \& works for MkIV as well as LMTX, there's an easy workaround. > > But maybe this isn't intended behaviour and needs checking. > intended ... author passes different through the system in lmtx > (better) Apparently not only author. Also

Re: [NTG-context] Ampersand in \unprotect fails in LMTX

2021-07-09 Thread Hans Hagen
On 7/9/2021 12:56 PM, Marco Patzer wrote: Hi! the following example compiles with MkIV but fails in LMTX: \unprotect \setupinteraction [\c!author={Foo & Bar}] %% {Foo \& Bar} works for MkIV and LMTX \protect \starttext\null\stoptext LMTX: 1 \unprotect 2

[NTG-context] Ampersand in \unprotect fails in LMTX

2021-07-09 Thread Marco Patzer
Hi! the following example compiles with MkIV but fails in LMTX: \unprotect \setupinteraction [\c!author={Foo & Bar}] %% {Foo \& Bar} works for MkIV and LMTX \protect \starttext\null\stoptext LMTX: 1 \unprotect 2 \setupinteraction 3 [\c!author={Foo & Bar}] 4 >>

[NTG-context] Ampersand followed by semicolon in XML: possible bug?

2015-09-29 Thread massifr
, the ampersand and the following semicolon are eaten up. I've found a way around, until the bug is fixed (if it's a bug and not my limited knowledge of ConTeXt): put a XML comment after the ampersand, and everything works as expected

Re: [NTG-context] Ampersand followed by semicolon in XML: possible bug?

2015-09-29 Thread massifr
I've seen that the ampersand gets interpreted as HTML on the mailing list. I'm sending the example as an attachment. Here's a modified version to be seen on the mailing list site: \startbuffer[test] Me amp; my friends; you amp; your friends. Me amp; my friends. You amp; your friends

Re: [NTG-context] Ampersand followed by semicolon in XML: possible bug?

2015-09-29 Thread Hans Hagen
On 9/29/2015 5:58 PM, mass...@fastwebnet.it wrote: Hello list, I've found what it looks like a bug in XML handling in ConTeXt. Try this: It's a side effect of a mechanism that is enables while it shouldn't (relates to dealing with escaped entities). Fixed in next beta. Hans

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
- label(textext(\letterbackslash\letterampersand),origin); - label(textext(\letterbackslash\),origin); This is because the commands are interpreted with TeX before they are written to mpgraph.mp. The \letterampersand or \ generates the character alone: you need to preceed it with

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
performed was the ampersand and it needs the same workaround using \letterbackslash as textext. I know, your MyWay is old. Maybe some things are fixed now. But I don't see many advantages for me using it. don't expect mkii and mkiv to be 100% compatible in this area (mkii is somewhat stretching things

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 12:06, Marco wrote: for i=0 downto -3: ran; label(\sometxt{\bold{Test}}, (7cm,-4cm)) rotatedaround ((7cm,-4cm),i*20) withcolor transparent(normal, .2, (r,g,b)); endfor; because transparent overloads the mechanism that sometxt (textext) uses for passing info to tex

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 1:45, Marco wrote: On Fri, 14 May 2010 12:44:47 +0200, Hans Hagenpra...@wxs.nl wrote: On 14-5-2010 12:06, Marco wrote: for i=0 downto -3: ran; label(\sometxt{\bold{Test}}, (7cm,-4cm)) rotatedaround ((7cm,-4cm),i*20) withcolor transparent(normal, .2, (r,g,b));

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 3:07, Aditya Mahajan wrote: This is because the commands are interpreted with TeX before they are written to mpgraph.mp. The \letterampersand or \ generates the character alone: you need to preceed it with backslash, so that metapost finally knows what to do. So, should all the

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Mojca Miklavec
On Fri, May 14, 2010 at 12:06, Marco wrote: On Fri, 14 May 2010 00:37:44 +0200, Mojca Miklavec wrote: PS: I would say: better use \sometxt which is far more reliable unless you have to use textext to do string manipulation. I don't know exactly which transformations are considered as »string

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
On Fri, 14 May 2010 17:20:35 +0200, Mojca Miklavec wrote: [...] Here are my results: -There is one obvious reason: speed Average runtime:    textext  variant: 56s    \sometxt variant: 57s That is the same. Maybe my test file is not appropriate to test the speed. I'm sure you

[NTG-context] Ampersand in Metapost

2010-05-13 Thread Marco
Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \ % OK \startMPcode label(textext(\),origin); % produces error \stopMPcode \stoptext The compile time error message is as follows: ! Misplaced alignment

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Hans Hagen
On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \ % OK \startMPcode label(textext(\),origin); % produces error \stopMPcode \stoptext The compile time error message

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 22:58, Hans Hagen wrote: On 13-5-2010 9:18, Marco wrote: I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \  % OK \startMPcode label(textext(\),origin); % produces error

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Marco
On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote: On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \ % OK \startMPcode label(textext

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 23:45, Marco net...@lavabit.com wrote: On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote: On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Aditya Mahajan
On Fri, 14 May 2010, Mojca Miklavec wrote: On Thu, May 13, 2010 at 23:45, Marco net...@lavabit.com wrote: On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote: On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works